﻿using System.ComponentModel;
using System.ComponentModel.DataAnnotations.Schema;
using PmSoft.Core.Domain.Entities;
using PmSoft.Core.Domain.Entities.Caching;
using PmSoft.Data.Abstractions.Attributes;

namespace Demo.Domains.Entities.Sys;

/// <summary>
/// 角色信息
///</summary>
[Table("sys_role")]
[CacheSetting(true)]
[Description("角色信息")]
[Auditable("sys")]
public class SysRole : Entity<int>
{
	/// <summary>
	/// 角色ID
	/// </summary>
	[PrimaryKey("id")]
	public override int Id { get; set; }
	/// <summary>
	/// 角色名称 
	///</summary>
	[Column("name")]
	public string Name { get; set; }
	/// <summary>
	/// 角色标识，唯一，前端权限判断 
	///</summary>
	[Column("code")]
	public string Code { get; set; }
	/// <summary>
	/// 是否为系统保留 
	///</summary>
	[Column("is_keep")]
	public bool? IsKeep { get; set; }
	/// <summary>
	/// 创建时间 
	///</summary>
	[Column("create_time")]
	public DateTime CreateTime { get; set; } = DateTime.Now;
 
}
